﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using MSWord = Microsoft.Office.Interop.Word;
namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            object path;                              //文件路径变量
            string strContent;                        //文本内容变量
            MSWord.Application wordApp;                   //Word应用程序变量 
            MSWord.Document wordDoc;                  //Word文档变量

            path = @"C:\Users\35024\Desktop\恒创文档\Geek+数据同步系统详细设计(1).docx";
            wordApp = new MSWord.Application(); //初始化
            wordApp.Visible = false;//使文档可见
            wordDoc = wordApp.Documents.Open(path, Missing.Value);
           var a=wordDoc.Paragraphs;
            Console.ReadLine();
        }
    }
}
